import 'babel-polyfill';
import dva from 'dva';
import { browserHistory } from 'dva/router';

import 'moment/locale/zh-cn';

// import models from './models';

import './rollbar';
import './index.less';
import router from './router';

// 1. Initialize
const app = dva({
  history: browserHistory,
});

// 2. Plugins
// app.use({});

// 3. Register all the models
app.model(require('./models/global'));
// app.model(require('./models/meetingRoom'));
// app.model(require('./models/meetingRoomList'));
// models.forEach((m) => {
//   app.model(m);
// });

// 4. Router
app.router(router);

// 5. Start
app.start('#root');
